﻿<%@ Page Title="Rejection Rule" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="RejectionRule.aspx.cs" Inherits="TestJQGrid.RejectionRule" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style2
        {
            width: 142px;
        }
        .style3
        {
            width: 165px;
        }
    </style>
    <link rel="stylesheet" type="text/css" media="all" href="../jsdatepick-calendar/jsDatePick_ltr.min.css" />
    <script type="text/javascript" src="../jsdatepick-calendar/jsDatePick.min.1.3.js"></script>
    <script type="text/javascript">
        function getDate(cid)
        {
            new JsDatePick({
                    useMode: 2,
                    target: cid,
                    dateFormat: "%d-%M-%Y",
                });
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Label ID="lblMenuName" runat="server" Text="Label"></asp:Label>
    <table style="width: 100%;">
        <tr>
            <td align="left" valign="top" style="width: 15%; border: 1px solid;">
                <asp:DataList ID="dlFormula" runat="server" RepeatColumns="1" RepeatDirection="Vertical"
                    CellPadding="2" DataKeyField="ID">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbt_formula" Text='<%# DataBinder.Eval(Container.DataItem,"FormulaName") %>'
                            CommandArgument='<%# Eval("ID") %>' runat="server" OnClick="lbt_formula_Click">LinkButton</asp:LinkButton>
                    </ItemTemplate>
                </asp:DataList>
            </td>
            <td align="left" valign="top" style="width: 85%; border: 1px solid;">
                <asp:HiddenField ID="currentControl" runat="server" Value="MainContent_txtWhenPart" />
                <asp:HiddenField ID="tableNames" runat="server" />
                <div style="width: 100%; height: auto;">
                    <table width="100%" style="float: left;">
                        <tr>
                            <td class="style3">
                                Name :
                            </td>
                            <td>
                                <asp:TextBox ID="txtFurmulaName" Width="250px" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style3">
                                Valid For
                            </td>
                            <td>
                                <table cellpadding="2">
                                    <tr>
                                        <td>
                                            From Date :
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtFromDate" runat="server" onClick="return getDate('MainContent_txtFromDate');"></asp:TextBox>
                                        </td>
                                        <td>
                                            To :
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtToDate" runat="server" onClick="return getDate('MainContent_txtToDate');"></asp:TextBox>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td class="style3">
                                When part
                            </td>
                            <td>
                                <asp:TextBox Rows="5" runat="server" Width="400px" ID="txtWhenPart" TextMode="MultiLine"
                                    onClick='return setCurrentControl("MainContent_txtWhenPart","MainContent_currentControl")'></asp:TextBox>
                                <asp:Label ID="lblWhenExp" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="style3">
                                <div id="div_formula" style="float: left; width: auto; margin-right: 15px;">
                                    <b style="float: left;">Formula List:</b><br />
                                    <asp:ListBox SelectionMode="Single" ID="listFormula" Rows="9" runat="server" onClick='return selectoperator(this.value,"MainContent_currentControl");'>
                                    </asp:ListBox>
                                </div>
                            </td>
                            <td align="center">
                                <div id="div_fields" style="float: left; width: auto; margin-right: 15px;">
                                    <b style="float: left;">Field List :</b><br />
                                    <asp:ListBox SelectionMode="Single" ID="listFields" Rows="9" runat="server" onClick='return selectoperator(this.value,"MainContent_currentControl");'>
                                    </asp:ListBox>
                                </div>
                                <div id="div_operator" style="float: left; width: auto;">
                                    <b style="float: left;">Operator :</b><br />
                                    <table class="buttonList" cellpadding="0" cellspacing="1" style="width: 100px;">
                                        <tr>
                                            <td>
                                                <input class="smallbutton" type="button" value="+" onclick='return selectoperator(this.value,"MainContent_currentControl");'
                                                    style="width: 45px; height: 35px; font-weight: bold" />
                                            </td>
                                            <td>
                                                <input class="smallbutton" type="button" value="-" onclick='return selectoperator(this.value,"MainContent_currentControl");'
                                                    style="width: 45px; height: 35px; font-weight: bold" />
                                            </td>
                                            <td>
                                                <input class="smallbutton" type="button" value="*" onclick='return selectoperator(this.value,"MainContent_currentControl");'
                                                    style="width: 45px; height: 35px; font-weight: bold" />
                                            </td>
                                            <td>
                                                <input class="smallbutton" type="button" value="/" onclick='return selectoperator(this.value,"MainContent_currentControl");'
                                                    style="width: 45px; height: 35px; font-weight: bold" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <input class="smallbutton" type="button" value="(" onclick='return selectoperator(this.value,"MainContent_currentControl");'
                                                    style="width: 45px; height: 35px; font-weight: bold" />
                                            </td>
                                            <td>
                                                <input class="smallbutton" type="button" value=")" onclick='return selectoperator(this.value,"MainContent_currentControl");'
                                                    style="width: 45px; height: 35px; font-weight: bold" />
                                            </td>
                                            <td>
                                                <input class="smallbutton" type="button" value="=" onclick='return selectoperator(this.value,"MainContent_currentControl");'
                                                    style="width: 45px; height: 35px; font-weight: bold" />
                                            </td>
                                            <td>
                                                <input class="smallbutton" type="button" value="!=" onclick='return selectoperator(this.value,"MainContent_currentControl");'
                                                    style="width: 45px; height: 35px; font-weight: bold" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <input class="smallbutton" type="button" value="<" onclick='return selectoperator(this.value,"MainContent_currentControl");'
                                                    style="width: 45px; height: 35px; font-weight: bold" />
                                            </td>
                                            <td>
                                                <input class="smallbutton" type="button" value=">" onclick='return selectoperator(this.value,"MainContent_currentControl");'
                                                    style="width: 45px; height: 35px; font-weight: bold" />
                                            </td>
                                            <td>
                                                <input class="smallbutton" type="button" value="&lt;=" onclick='return selectoperator(this.value,"MainContent_currentControl");'
                                                    style="width: 45px; height: 35px; font-weight: bold" />
                                            </td>
                                            <td>
                                                <input class="smallbutton" type="button" value="=>" onclick='return selectoperator(this.value,"MainContent_currentControl");'
                                                    style="width: 45px; height: 35px; font-weight: bold" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <input class="smallbutton" type="button" value="," onclick='return selectoperator(this.value,"MainContent_currentControl");'
                                                    style="width: 45px; height: 35px; font-weight: bold" />
                                            </td>
                                            <td>
                                                <input class="smallbutton" type="button" value="AND" onclick='return selectoperator("&&","MainContent_currentControl");'
                                                    style="width: 45px; height: 35px; font-weight: bold" />
                                            </td>
                                            <td>
                                                <input class="smallbutton" type="button" value="OR" onclick='return selectoperator("||","MainContent_currentControl");'
                                                    style="width: 45px; height: 35px; font-weight: bold" />
                                            </td>
                                            <td>
                                                <input class="smallbutton" type="button" value="NOT" onclick='return selectoperator("!","MainContent_currentControl");'
                                                    style="width: 45px; height: 35px; font-weight: bold" />
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="style3">
                                &nbsp;
                            </td>
                            <td align="left">
                                <asp:Button ID="btnValidate" runat="server" Text="Validate" OnClick="btnValidate_Click"
                                    OnClientClick="return validateForm_rejection();" />&nbsp;&nbsp;
                                <asp:Button ID="btnReset" runat="server" Text="Reset" OnClick="btnReset_Click" />&nbsp;&nbsp;
                                <asp:Button runat="server" ID="btnSave" Text="Save Rejectionrule" OnClick="btnSave_Click" />
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
    </table>
</asp:Content>
